<template>
  <svg-icon icon-class="fullscreen" @click="svgClick" />
</template>
<script>
import screenfull from 'screenfull'
export default {
  name: 'Fullscreen',
  methods: {
    svgClick() {
      if (screenfull.isEnabled) {
        screenfull.toggle()
      } else {
        this.$message.error('该浏览器不支持全屏')
      }
    }
  }
}
</script>
<style></style>
